TableGetTableApplyDetail
查询申请单信息
查询指定表申请单的详细信息,目前只支持查询加表、变更表、删除表、清空表、复制表数据五种申请单的查询,其沿用加表、修改表、清理表、删除表、复制表数据的权限。
若没有权限审核单据时,可利用此接口查询单据的状态,获取单据对应的事务id,事务的set_id,而进行其他的事务操作。
请求地址
GET
http://OmsAddress/app/newoms.php/webservice/business/table/get-table-apply-detail/<uid>?cmd=10008&ip-type=webservicerest&access-token=AccessTokenVal
url中GET参数说明
参数名称 | 数据类型 | 说明 | 是否必填字段 | 备注 |
---|---|---|---|---|
uid | 整型 | 申请单的id | 是 | |
cmd(cmdVal) | 整型 | 接口类型 查询加表申请单:cmd=10002 查询修改表申请单:cmd=10003 查询清理表申请单:cmd=10004 查询删除表申请单:cmd=10005 查询复制表数据申请单:cmd=10008 | 是 |
返回语法
返回参数说明
返回状态码不为200时,获取信息失败,返回数据为错误信息
返回状态码为200,表示成功获取的申请单详情,申请单包含的信息
字段 | 字段说明 | 备注 |
---|---|---|
id | 申请单id | |
set_id | table所在的集群的id | |
app_id | table所在的业务的id | |
zone_list | table所在的游戏区的id | |
table_name | table的名称 | |
table_type | table类型 | 0:generic 1:list |
table_maxnum | table的最大元素格式 | table_type = 1时,值才有意义 |
apply_type | 申请操作的类型 | 0:表添加 1:表删除 2:表清理 3:表变更 7:复制表数据 |
ext_zone_id | apply_type=7时,复制表数据申请单的目标游戏区的id | |
user | 申请单据的用户名称 | |
execute_status | 单据的状态 | -1:已拒绝 0:待审核 1:已审核并提交事务 2:事务已执行成功 |
execute_user | 审核单据的用户名称 | |
trans_id | 单据生成的事务的id |
请求示例
通过 curl 方法发起请求
命令中的参数请参考本页中的“POST请求参数说明”,access-token的获取方法详见:获取access-token
curl -H "Content-type: application/json" -X "GET" http://omsaddress/app/newoms.php/webservice/business/table/get-table-apply-detail/%3Cuid%3E?cmd=10008&ip-type=webservicerest&access-token=<access-token>&uid=<uid>
返回示例
成功返回示例
http请求的Status=200
{
"id": 289,
"set_id": 126,
"app_id": 3,
"zone_list": "1",
"table_name": "table_in_same_svr",
"table_type": 0,
"table_maxnum": 0,
"apply_type": 7,
"ext_zone_id": "2",
"user": "tcaplus",
"execute_status": 1,
"execute_user": "tcaplus",
"trans_id": "201"
}
错误返回
http请求的Status!=200
{
"name": "Unauthorized",
"message": "You are requesting with an invalid credential.",
"code": 0,
"status": 401,
"type": "yii\\web UnauthorizedHttpException"
}
{
"uid": [
"ip(10.29.89.37) not in whitelist for getting table apply detail(cmd:10008) in set_id:126 app_id:3 zone_id:1 table_name:table_in_same_svr"
]
}